<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>注册</title>


    <link rel="stylesheet" type="text/css" href="css/bootstrap/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="css/weixin/main.css"/>
    <script type="text/javascript" src="js/jquery/jquery-1.11.3.js"></script>
    <script type="text/javascript" src="js/bootstrap/bootstrap.js"></script>
    <script type="text/javascript" src="js/jquery/jquery.form.js"></script>
    <script type="text/javascript" src="js/iscroll/iscroll-probe.js"></script>
    <script type="text/javascript" src="js/weixin/toast_tool.js"></script>

</head>
<body>
<div id="header">
    <div class="container-fluid">
        <span>用户注册</span>
    </div>
</div>
<div class="container regis">
    <form id="register_form" action="/weixin/register" method="post" class="form-signin" role="form">

        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-12">
                <input id="username" name="username" type="text" placeholder="手机号码" class="form-control input1" required
                       autofocus>
            </div>
        </div>
        <input id="usage" name="usage" type="hidden" value="REGISTER">

        <div class="row">
            <div class="col-xs-5 col-sm-5 col-md-5 pa_rig">
                <input id="captcha" name="captcha" type="text" class="form-control input2" placeholder="验证码" required/>
            </div>
            <div class="f_l btnstyle01 col-xs-6 col-sm-6 col-md-6 pa_lef" id="divphone">
            	<span> 
                	<a class="btn btn-small btn-default btn1" id="fetch_captcha" onclick="send(2)" href="#">点击获取验证码</a>
                </span>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-12">
                <input id="password" name="password" type="password" placeholder="密码" class="form-control input1"
                       required>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-12">
                <input id="password2" name="password2" type="password" placeholder="确认密码" class="form-control input1"
                       required>
            </div>
        </div>
        <input id="token" name="token" type="hidden">
        <input id="type" name="type" type="hidden" value="USER">

        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-12">
                <button id="submit" type="submit" class="btn btn-small btn-primary btn-block dpink">注册</button>
            </div>
        </div>


    </form>
</div>
</body>
<script type="text/javascript">
    function send(msg) {
        f_timeout();
    }
    function f_timeout() {
        $('#divphone').html('<p style="line-height:35px;"><lable id="timeb2">60</lable>秒后重新获取 </p>');
        timer = self.setInterval(addsec, 1000);
    }
    function addsec() {
        var t = $('#timeb2').html();
        if (t > 0) {
            $('#timeb2').html(t - 1);
        } else {
            window.clearInterval(timer);
            $('#divphone').html("<span><a style='background: #f6f4f5; color: #333; border: 1px solid transparent;border-radius:4px;border-color: #ccc;display: inline-block; padding: 6px 12px;' onclick='send(2)' href='#' >点击获取验证码</a></span>");
        }

    }
</script>
</html>
